import sys
from PySide6 import QtWidgets

from ui.uiMainwindow import Ui_MainWindow
import resource
from controller.appController import Context

if __name__ == "__main__":
    app = QtWidgets.QApplication([])
    mainWin = Ui_MainWindow()
    mainWin.setupUi(mainWin)
    # 上下文处理
    ctx = Context(mainWin)
    mainWin.show()
    sys.exit(app.exec())



# This Python file uses the following encoding: utf-8
# import sys
# from pathlib import Path
#
# from PySide6.QtGui import QGuiApplication
# from PySide6.QtQml import QQmlApplicationEngine
#
# if __name__ == "__main__":
#     app = QGuiApplication(sys.argv)
#     engine = QQmlApplicationEngine()
#     qml_file = Path(__file__).resolve().parent / "main.qml"
#     engine.load(qml_file)
#     if not engine.rootObjects():
#         sys.exit(-1)
#     sys.exit(app.exec())
